package com.microservice.consumer.movie.service;

import com.microservice.consumer.movie.bean.User;
import com.microservice.consumer.movie.service.feignfactory.UserFeignFactory;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(name = "provider-user",fallbackFactory = UserFeignFactory.class)
public interface UserFeignInterface {
    @RequestMapping(value = "/{id}",method = RequestMethod.GET)
    public User findById(@PathVariable("id") Long id);

    @RequestMapping(value = "/userByMap",method = RequestMethod.GET)
    public User findByMap(@RequestParam Map id);
}
